<template>
  <div class="home">
    <button class="md-btn md-theme-primary" type="button" @click="openProgress()">导出成功</button>
    <button  class="md-btn md-theme-error" type="button" @click="openProgressFail()">导出失败</button>
  </div>
</template>

<script>

export default {
  name: 'HomeView',
  components: {
    
  },
  methods:{
    openProgress(){
      this.$progress.start({tip:'正在导出中...,请稍后'})
      setTimeout(()=>{
        this.$progress.finish('导出成功')
      },1000)
     
    },
    openProgressFail(){
      this.$progress.start({tip:'正在导出中...,请稍后'})
      setTimeout(()=>{
        this.$progress.fail('导出失败')
      },1000)
    }
  }
}
</script>
<style>
.md-btn{
  font-size:18px;
  line-height:40px;
  border:none;
  outline:none;
  color:#fff;
  margin-right:20px;
  border-radius:4px;
  cursor:pointer;
}
.md-theme-primary{
  background:blue;
}
.md-theme-error{
  background:red;

}
</style>